import { Injectable } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { DeepPartial, Repository } from 'typeorm';
import { Roles } from './modules/roles.entity';

@Injectable()
export class RolesService {
    constructor(@InjectRepository(Roles) private rolesRepositorys: Repository<Roles>) {}
    // 新增用户
    async create(entity: DeepPartial<Roles>): Promise<any> {
        const res = await this.rolesRepositorys.insert(entity);
        return res;
    }
}
